/*
 * @Author: 来自火星的码农 15122322+heyzhi@user.noreply.gitee.com
 * @Date: 2025-06-28 14:57:15
 * @LastEditors: 来自火星的码农 15122322+heyzhi@user.noreply.gitee.com
 * @LastEditTime: 2025-08-07 17:43:10
 * @FilePath: /server/workspace/src/base/util.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef __YIZHI_UTIL_H__
#define __YIZHI_UTIL_H__
#include"Log.h" 
#include<pthread.h>
#include<unistd.h>
#include<stdio.h>
#include<sys/syscall.h>
#include<sys/types.h>
#include<memory>
#include<vector>
#include<execinfo.h>
#include<sys/time.h>
namespace Yizhi{
   pid_t GetThreadid();
   uint32_t GetFiberid();


   void BackTrace(std::vector<std::string>&bt,int size,int skip);
   std::string BackTraceTostring(int skip,int size,std::string prefixName="");


   uint64_t GetcurrentMs();
   uint64_t GetcurrentUs();
}
#endif